package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.ClassInfoMapper;
import org.shop.entity.ClassInfo;
import org.shop.service.ClassInfoService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ClassInfoServiceImpl extends BaseServiceImpl<ClassInfo, Long> implements ClassInfoService{

	@Autowired
	private ClassInfoMapper classInfoMapper;
	
	@Override
	public Map<String, Object> getClassInfoList(Map<String, Object> paramMap) {
		List<ClassInfo> classInfoList = classInfoMapper.getClassInfoList(paramMap);
        Integer count = classInfoMapper.getClassInfoCount(paramMap);
        //分页数据
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("total", count);
        dataMap.put("rows", classInfoList);
        return dataMap;
	}

	@Override
	public ClassInfo getClassInfo(Map<String, Object> paramMap) {
		return classInfoMapper.getClassInfo(paramMap);
	}
	
	@Override
	public List<ClassInfo> getAllClassInfoList() {
		return classInfoMapper.getAllClassInfoList();
	}
	
	
}